<nav class="Polaris-Navigation" <%= tag.attributes @system_arguments[:attributes]  %> >
  <% if @logo.present? %>
    <div class="Polaris-Navigation__LogoContainer">
      <%= link_to(@logo.url,
        class: "Polaris-Navigation__LogoLink",
        style: "width: #{@logo.width}"
      ) do %>
        <%= image_tag @logo.src,
          class: "Polaris-Navigation__Logo",
          style: "width: #{@logo.width}",
          alt: @logo.alt %>
      <% end %>
    </div>
  <% end %>

  <%= polaris_scrollable(classes: "Polaris-Navigation__PrimaryNavigation") do %>
    <% if sections.present? %>
      <% sections.each do |section| %>
        <%= section %>
      <% end %>
    <% else %>
      <%= render(Polaris::Navigation::SectionComponent.new) do %>
        <% items.each do |item| %>
          <%= item %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
</nav>
